package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

/**
 * 企业证件类型
 * @author admin
 *
 */
public enum StoreEnterpriseCertType implements EnumInterface<StoreEnterpriseCertType, Integer> {
	BUSINESS_LICENSE(1, "营业执照"), 
	UNIFIED_SOCIAL_CREDIT_CODE(2, "统一社会信用代码证");

	private int real;

	private String describe;

	private StoreEnterpriseCertType(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public StoreEnterpriseCertType realOf(Integer real) {
		if (Check.notNull(real)) {
			for (StoreEnterpriseCertType v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
